{include file="public/header-static"/}
{include file="public/sidebar"/}


<div id="main">
    {include file="public/header"/}
    <main class="main-content">
        <div class="container">
            <div class="page-header">
                <nav aria-label="breadcrumb">
                    <ol class="breadcrumb">
                        <li class="breadcrumb-item">
                            <a href="#">首页</a>
                        </li>
                        <li class="breadcrumb-item active" aria-current="page">帖子设置  </li>
                    </ol>
                </nav>
            </div>
            <div class="row">
                <div class="col-md-12">
                    <div class="card">
                        <div class="card-body">


                            <div class="form-group row">
                                <label class="col-sm-1 col-form-label">用户ID</label>
                                <div class="input-group col-sm-8">

                                    <input type="text" class="form-control" name="uid" required="" aria-required="true" value="{$info.uid}">

                                </div>

                            </div>

                            <div class="form-group row">
                                <label class="col-sm-1 col-form-label">用户昵称</label>
                                <div class="input-group col-sm-8">

                                    <input type="text" class="form-control" name="nickname" required="" aria-required="true" value="{$info.nickname}">

                                </div>

                            </div>

                            <div class="form-group row">
                                <label class="col-sm-1 col-form-label">帖子分类</label>
                                <div class="input-group col-sm-8">

                                    <input type="text" class="form-control" name="pcid" required="" aria-required="true" value="{$info.cate}">

                                </div>

                            </div>


                            <div class="form-group row">
                                <input type="hidden" name="id" value="{$info.id}">
                                <label class="col-sm-1 col-form-label">封面图片</label>
                                <div class="col-sm-8">
                                    <input type="hidden" class="form-control images" name="images" required="" aria-required="true" value="{$info.images}">

                                    <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;">
                                        预览图：
                                        <div class="layui-upload-list uploader-list" style="overflow: auto;" id="uploader-images">

                                            {php}
                                                if ($info['images']) {
                                                    $image_list = explode(',',$info['images']);
                                                    foreach ($image_list as $v)
                                                    {
                                            {/php}

                                                <div class="file-iteme">
                                                    <div class="handle fm" src="{$v}">
                                                        <span class="fa fa-times" style="border-radius: 0.375rem 0.375rem 0 0;"></span>
                                                    </div>
                                                    <img style="width: 5rem;height: 5rem;border-radius: 0.375rem;" src="{$v}">
                                                </div>

                                            {php}
                                                } }
                                            {/php}


                                        </div>
                                    </blockquote>
                                </div>
                            </div>

                            <div class="form-group row">
                                <label class="col-sm-1 col-form-label">VIDEO</label>
                                <div class="input-group col-sm-4">

                                    <input type="hidden" class="form-control video" name="video" required="" aria-required="true" value="{$info.video}">
                                    <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;width: 25rem">
                                        预览视频：
                                        <div class="layui-upload-list" id="video-list" style="display: flex;margin-top: 0.625rem">
                                            {if $info.video}
                                                <video width="320" src="{$info.video}" class="videos" controls="controls" loop></video>
                                            {/if}
                                        </div>
                                    </blockquote>
                                </div>
                            </div>





                            <div class="form-group row">
                                <label class="col-sm-1 col-form-label">帖子详情</label>
                                <div class="col-sm-8">
<!--                                        <textarea id="content" name="content">{$info.content}</textarea>-->
                                    <textarea id="custom_text" placeholder="帖子详情"  name="content" rows="20" cols="91">{$info.content}</textarea>
                                </div>
                            </div>

                            <button id="return" class="btn btn-secondary">返回</button>
                        </div>
                    </div>
                </div>
            </div>

        </div>
    </main>

    {include file="public/footer"/}

    <script>

        $('#return').click(function () {
            window.location.href = '{:url("/console/post")}';
        });

    </script>


</div>